﻿namespace LM.Repositorios.Maps
{
    using LM.Negocio;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.ModelConfiguration;

    public class VagaMap : EntityTypeConfiguration<Vaga>
    {
        public VagaMap()
        {
            this.HasKey(m => m.Codigo);
            this.Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");
            this.Property(m => m.Codigo).HasColumnName("Codigo").IsRequired();
            this.Property(m => m.Numero).HasColumnName("Numero").IsRequired();
            this.Property(m => m.Tipo).HasColumnName("Tipo").IsRequired().HasMaxLength(15);

            this.ToTable("VAGA");
        }
    }
}
